{include file="header.html"}
<script type="text/javascript">
    $(function () {
        $('#ad_form').validate({
            errorPlacement: function (error, element) {
                $(element).next('.field_notice').hide();
                $(element).after(error);
            },
            success: function (label) {
                label.addClass('right').text('OK!');
            },
            onkeyup: false,
            rules: {
                {if !$ad.ad_pic}
                ad_pic: {
                    required: true,
                    accept: 'gif|png|jpe?g'
                },
                {/if}
                ad_name: {
                    required: true,
                }
            },
            messages: {
                {if !$ad.ad_pic}
                ad_pic: {
                    required: '{$lang.ad_logo_empty}',
                    accept: '{$lang.limit_img}'
                },
                {/if}
                ad_name: {
                    required: '{$lang.ad_name_empty}',
                }
            }
        });
    });
</script>
<div id="rightTop">
    <p>{$lang.ad}</p>
    <ul class="subnav">
        <li><a class="btn1" href="index.php?app=coupon&act=setting">{$lang.manage}</a></li>
        <li><span>{$lang.edit}</span></li>
    </ul>
</div>

<div class="info">
    <form method="post" enctype="multipart/form-data" id="banner_form">
        <table class="infoTable">
            <tr>
                <th class="paddingT15">
                    名称:</th>
                <td class="paddingT15 wordSpacing5" >
                    <input class="infoTableFile2" id="banner_remark" name="name" value="{$ad.name}"/>
                    <input type="hidden" name="setting_id" value="{$ad.setting_id}">

                </td>
            </tr>
            <tr>
                <th class="paddingT15">
                    备注:</th>
                <td class="paddingT15 wordSpacing5" >
                    <input class="infoTableFile2"  name="remark" value="{$ad.remark}"/>
                </td>
            </tr>
            <tr>
                <th class="paddingT15">
                    金额:</th>
                <td class="paddingT15 wordSpacing5">
                    <input class="infoTableFile2"  type="text" name="money"  value="{$ad.money}"/>
                </td>
            </tr>
            <tr>
                <th class="paddingT15">
                    订单最小金额:</th>
                <td class="paddingT15 wordSpacing5">
                    <input class="infoTableFile2"  type="text" name="min_money"  value="{$ad.min_money}"/>
                </td>
            </tr>
             <tr>
                <th class="paddingT15">
                    有效期:</th>
                <td class="paddingT15 wordSpacing5">
                    <input class="infoTableFile2" id="expiry_time" type="number" name="expiry_time"  value="{$ad.day}"/>
                    <span>天</span>
                </td>
            </tr>
            <tr>
                <th></th>
                <td class="ptb20">
                    <input class="formbtn" type="submit" name="Submit" value="{$lang.submit}" />
                    <input class="formbtn" type="reset" name="Submit2" value="{$lang.reset}" />
                </td>
            </tr>
        </table>
    </form>

</div>
{include file="footer.html"}

